import axios from "axios";

//未登录
//  let icon=()=>{
//     let url='api/bottomNav/getBottomNavigation.action?_format_=json&isNewVersion=1&curtainVersion=null&t=0.7023775035286617'
//    return axios.get(url)
//  }
 //登录
 let login=()=>{

    let urllogin='api/bottomNav/getBottomNavigation.action?_format_=json&isNewVersion=1&curtainVersion=null&t=0.16617814616847104'
   return axios({
       method:"get",
       url:urllogin,
       data:{
        referer: 'https://home.m.jd.com/',
       },
       Headers:{"Conyent-Type":"application/json"}
   })
 }
 //购物车产品信息
  let carte_list=()=>{
    let url='item.json'
   return axios.get(url)
 }
 let sy=()=>{
  let url='list.json'
 return axios.get(url)
}
 let searchpromptwords=()=>{
   let ur='wqjd/bases/searchpromptwords/searchpromptwords?_=1626072593836&sceneval=2&callback=jsonpCBKA'
   return axios({
    method:"get",
    url:ur,
    data:{
      Referer:'https://m.jd.com/'
     },
     
       Headers:{"Conyent-Type":"application/json"}
})
 }
 let category=(data)=>{
let urll='xiami/v1/home/category_v2'
return axios.post(urll,data)
 }
export {login,carte_list,searchpromptwords,category,sy}